# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-prawcore
pkgver=1.0.1
pkgrel=3
pkgdesc='Low-level communication layer for PRAW 4+.'
arch=('any')
license=('BSD')
url='https://github.com/praw-dev/prawcore'
depends=('python2-requests')
makedepends=('python2-setuptools')
checkdepends=('python2-mock' 'python2-betamax-matchers'
              'python2-betamax-serializers' 'python2-testfixtures')
source=("$pkgname-$pkgver.tar.gz::https://github.com/praw-dev/prawcore/archive/v$pkgver.tar.gz")
sha512sums=('6efe8faa685aa92a04309c4c24963a2a540335ad0bed31b990d840732ddf726789688171f4ead4daf831e89da5c95c17861a079dfc9ae3de254d2690bcff1c8b')

build() {
  cd "prawcore-$pkgver"

  python2 setup.py build
}

package() {
  cd "prawcore-$pkgver"

  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

